import service from '@/utils/request'

// @Tags PageImage
// @Summary 创建轮播图
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.PageImage true "创建轮播图"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /pageImage/createPageImage [post]
export const createPageImage = (data) => {
  return service({
    url: '/pageImage/createPageImage',
    method: 'post',
    data
  })
}

// @Tags PageImage
// @Summary 删除轮播图
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.PageImage true "删除轮播图"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /pageImage/deletePageImage [delete]
export const deletePageImage = (params) => {
  return service({
    url: '/pageImage/deletePageImage',
    method: 'delete',
    params
  })
}

// @Tags PageImage
// @Summary 批量删除轮播图
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除轮播图"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /pageImage/deletePageImage [delete]
export const deletePageImageByIds = (params) => {
  return service({
    url: '/pageImage/deletePageImageByIds',
    method: 'delete',
    params
  })
}

// @Tags PageImage
// @Summary 更新轮播图
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.PageImage true "更新轮播图"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /pageImage/updatePageImage [put]
export const updatePageImage = (data) => {
  return service({
    url: '/pageImage/updatePageImage',
    method: 'put',
    data
  })
}

// @Tags PageImage
// @Summary 用id查询轮播图
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.PageImage true "用id查询轮播图"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /pageImage/findPageImage [get]
export const findPageImage = (params) => {
  return service({
    url: '/pageImage/findPageImage',
    method: 'get',
    params
  })
}

// @Tags PageImage
// @Summary 分页获取轮播图列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取轮播图列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /pageImage/getPageImageList [get]
export const getPageImageList = (params) => {
  return service({
    url: '/pageImage/getPageImageList',
    method: 'get',
    params
  })
}
